import adminSupport from 'lola-admin-support-el'
const service = adminSupport.lib.service

// 获取公告列表
const noticeList = function(data) {
  // console.log(data)
  const url = service.conf.api.get('public').url + '/1/notice/page'
  const promise = new Promise(function(resolve, reject) {
    resolve(service.post(url, data))
  })
  return promise
}

// 获取公告详情
const noticeDetail = function(id) {
  // console.log(data)
  const url = service.conf.api.get('public').url + '/1/notice/detail/' + id
  const promise = new Promise(function(resolve, reject) {
    resolve(service.get(url))
  })
  return promise
}
export default {
  noticeList: noticeList,
  noticeDetail: noticeDetail
}
